package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.AnesthesiaMethodMapper;
import com.ruoyi.manage.domain.AnesthesiaMethod;
import com.ruoyi.manage.service.IAnesthesiaMethodService;

/**
 * 麻醉方式Service业务层处理
 * 
 * @author liuyangyang
 * @date 2025-05-29
 */
@Service
public class AnesthesiaMethodServiceImpl implements IAnesthesiaMethodService 
{
    @Autowired
    private AnesthesiaMethodMapper anesthesiaMethodMapper;

    /**
     * 查询麻醉方式
     * 
     * @param anesthesiaMethodId 麻醉方式主键
     * @return 麻醉方式
     */
    @Override
    public AnesthesiaMethod selectAnesthesiaMethodByAnesthesiaMethodId(Long anesthesiaMethodId)
    {
        return anesthesiaMethodMapper.selectAnesthesiaMethodByAnesthesiaMethodId(anesthesiaMethodId);
    }

    /**
     * 查询麻醉方式列表
     * 
     * @param anesthesiaMethod 麻醉方式
     * @return 麻醉方式
     */
    @Override
    public List<AnesthesiaMethod> selectAnesthesiaMethodList(AnesthesiaMethod anesthesiaMethod)
    {
        return anesthesiaMethodMapper.selectAnesthesiaMethodList(anesthesiaMethod);
    }

    /**
     * 新增麻醉方式
     * 
     * @param anesthesiaMethod 麻醉方式
     * @return 结果
     */
    @Override
    public int insertAnesthesiaMethod(AnesthesiaMethod anesthesiaMethod)
    {
        anesthesiaMethod.setCreateTime(DateUtils.getNowDate());
        return anesthesiaMethodMapper.insertAnesthesiaMethod(anesthesiaMethod);
    }

    /**
     * 修改麻醉方式
     * 
     * @param anesthesiaMethod 麻醉方式
     * @return 结果
     */
    @Override
    public int updateAnesthesiaMethod(AnesthesiaMethod anesthesiaMethod)
    {
        anesthesiaMethod.setUpdateTime(DateUtils.getNowDate());
        return anesthesiaMethodMapper.updateAnesthesiaMethod(anesthesiaMethod);
    }

    /**
     * 批量删除麻醉方式
     * 
     * @param anesthesiaMethodIds 需要删除的麻醉方式主键
     * @return 结果
     */
    @Override
    public int deleteAnesthesiaMethodByAnesthesiaMethodIds(Long[] anesthesiaMethodIds)
    {
        return anesthesiaMethodMapper.deleteAnesthesiaMethodByAnesthesiaMethodIds(anesthesiaMethodIds);
    }

    /**
     * 删除麻醉方式信息
     * 
     * @param anesthesiaMethodId 麻醉方式主键
     * @return 结果
     */
    @Override
    public int deleteAnesthesiaMethodByAnesthesiaMethodId(Long anesthesiaMethodId)
    {
        return anesthesiaMethodMapper.deleteAnesthesiaMethodByAnesthesiaMethodId(anesthesiaMethodId);
    }
}
